//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.example.wechat.login.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

@Data
@Getter
@Setter
public class WechatSessionDTO {
    private String openid;
    @JsonProperty("session_key")
    private String sessionKey;
    private Integer expires_in;
    private String unionid;
    private Integer errcode;
    private String errmsg;

    public WechatSessionDTO() {
    }

    public String getOpenid() {
        return this.openid;
    }

    public String getSessionKey() {
        return this.sessionKey;
    }

    public String getUnionid() {
        return this.unionid;
    }

    public Integer getErrcode() {
        return this.errcode;
    }

    public String getErrmsg() {
        return this.errmsg;
    }

    public void setOpenid(final String openid) {
        this.openid = openid;
    }

    @JsonProperty("session_key")
    public void setSessionKey(final String sessionKey) {
        this.sessionKey = sessionKey;
    }

    public void setUnionid(final String unionid) {
        this.unionid = unionid;
    }

    public void setErrcode(final Integer errcode) {
        this.errcode = errcode;
    }

    public void setErrmsg(final String errmsg) {
        this.errmsg = errmsg;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof WechatSessionDTO)) {
            return false;
        } else {
            WechatSessionDTO other = (WechatSessionDTO)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$errcode = this.getErrcode();
                Object other$errcode = other.getErrcode();
                if (this$errcode == null) {
                    if (other$errcode != null) {
                        return false;
                    }
                } else if (!this$errcode.equals(other$errcode)) {
                    return false;
                }

                Object this$openid = this.getOpenid();
                Object other$openid = other.getOpenid();
                if (this$openid == null) {
                    if (other$openid != null) {
                        return false;
                    }
                } else if (!this$openid.equals(other$openid)) {
                    return false;
                }

                Object this$sessionKey = this.getSessionKey();
                Object other$sessionKey = other.getSessionKey();
                if (this$sessionKey == null) {
                    if (other$sessionKey != null) {
                        return false;
                    }
                } else if (!this$sessionKey.equals(other$sessionKey)) {
                    return false;
                }

                Object this$unionid = this.getUnionid();
                Object other$unionid = other.getUnionid();
                if (this$unionid == null) {
                    if (other$unionid != null) {
                        return false;
                    }
                } else if (!this$unionid.equals(other$unionid)) {
                    return false;
                }

                Object this$errmsg = this.getErrmsg();
                Object other$errmsg = other.getErrmsg();
                if (this$errmsg == null) {
                    if (other$errmsg != null) {
                        return false;
                    }
                } else if (!this$errmsg.equals(other$errmsg)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof WechatSessionDTO;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        Object $errcode = this.getErrcode();
        result = result * 59 + ($errcode == null ? 43 : $errcode.hashCode());
        Object $openid = this.getOpenid();
        result = result * 59 + ($openid == null ? 43 : $openid.hashCode());
        Object $sessionKey = this.getSessionKey();
        result = result * 59 + ($sessionKey == null ? 43 : $sessionKey.hashCode());
        Object $unionid = this.getUnionid();
        result = result * 59 + ($unionid == null ? 43 : $unionid.hashCode());
        Object $errmsg = this.getErrmsg();
        result = result * 59 + ($errmsg == null ? 43 : $errmsg.hashCode());
        return result;
    }

    public String toString() {
        return "WechatSessionDTO(openid=" + this.getOpenid() + ", sessionKey=" + this.getSessionKey() + ", unionid=" + this.getUnionid() + ", errcode=" + this.getErrcode() + ", errmsg=" + this.getErrmsg() + ")";
    }
}
